package cn.qiyu5522.domain.DTO;

import cn.qiyu5522.constant.SystemConsKeys;
import cn.qiyu5522.group.Add;
import cn.qiyu5522.group.Update;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * ClassName: UserInfoDTO
 * Package: cn.qiyu5522.domain.DTO
 * Description:
 *
 * @Author: Tonkey
 * @Create：2024/4/14-20:46
 * @Version: v1.0
 */
@Data
@Accessors(chain = true)
public class UserInfoDTO {
    @NotNull(message = SystemConsKeys.USERNAME_NOT_NULL,groups = { Update.class})
    private Long id;

    @NotBlank(message=SystemConsKeys.NICKNAME_NOT_NULL,groups = {Add.class})
    private String username;

    @NotBlank(message=SystemConsKeys.NICKNAME_NOT_NULL,groups = {Add.class, Update.class})
    private String nickName;

    @NotBlank(message = SystemConsKeys.PASSWORD_NOT_NULL,groups = {Add.class})
    private String password;

    private String sex;

    private String avatar;

    @NotBlank(message=SystemConsKeys.EMAIL_NOT_NULL,groups = { Add.class, Update.class})
    private String email;

}
